
-module(dc_cmd).

%% send_myinfo(Handle, Nick, Desc, Speed, Email, ShareSize) ->
%%     gen_tcp:send(Handle, "$MyINFO $ALL " ++ Nick ++ " \"" ++ Desc ++ "\"$ " ++
%%                          "$" ++ Speed ++ "$" ++ Email ++ "$" ++ ShareSize ++ "$").


%% get_nicklist(Handle) ->
%%     gen_tcp:send(Handle, "$GetNickList"),
%%     case wait_reply(Handle) of
%%         ["$NickList", NickString, "$OpList", OpString] ->
%%             Nicks = regexp:split(NickString, "$$"),
%%             Ops = regexp:split(OpString, "$$"),
%%             {Nicks, Ops};
%%         ["$NickList", NickString, "$OpList"] ->
%%             Nicks = regexp:split(NickString, "$$"),
%%             {Nicks, []};
%%         _ ->
%%             error                                       
%% 	end.
%% 
%% get_info(Handle, OtherNick, MyNick) ->
%%     gen_tcp:send(Handle, "$GetINFO " ++ OtherNick ++ " " ++ MyNick),
%%     case wait_reply(Handle) of
%%     	["$MyINFO", "$ALL", _, Desc, Speed, Email, ShareSize] ->
%%             {OtherNick, Desc, Speed, Email, ShareSize};
%%         _ ->
%%             error
%%     end.
%% 
%% respond(Handle) ->
%%     case wait_reply(Handle) of
%%     	["$Hello"] ->
%%             gen_tcp:send(Handle, "$Version 1,0091");
%%         _ ->
%%             nil
%%     end.

%% auth_handshake(Handle, Nick, Pass) ->
%%     Resp = wait_reply(Handle),
%%     io:fwrite("auth_handshake: got Resp ~p~n", [Resp]),
%%   	case Resp of
%%         {["$Lock", Key, PkStr], Msgs} ->
%%             io:fwrite("auth_handshake: got $Lock~n"),
%%             send_validate_key(Handle, Nick, Key),
%%             auth_handshake(Handle, Nick, Pass);
%%         {["$ValidateDenide"], Data} ->
%%         	auth_handshake(Handle, Nick, Pass);
%% 		{["$GetPass"], Data} ->
%%             send_pass(Handle, Nick, Pass);
%%         _ ->
%%             io:fwrite("auth_handshake: ah crap~n")
%%     end.
%% 
%% send_pass(Handle, Nick, Pass) ->
%%     gen_tcp:send(Handle, "$MyPass " ++ Pass),
%%     case wait_reply(Handle) of
%%         {"$HubName", HubName} ->
%%             {logged_in, HubName};
%%         {"$BadPass"} ->
%%             {badpass};
%%         _ ->
%%             error
%% 	end.
%% 
